package com.project.entity;

import java.util.List;

/**
 * @author wzm
 * @create 2023-05-31 15:44
 */
//分页查询时需要一个既List数据又有count总数的对象  我们选择自定义
public class PageBean<T> {
    private List<T> list; //查询到的数据
    private Integer count;//查询到的总条数

    public PageBean() {
    }

    public PageBean(List<T> list, Integer count) {
        this.list = list;
        this.count = count;
    }

    public List<T> getList() {
        return list;
    }

    public Integer getCount() {
        return count;
    }

    public void setList(List<T> list) {
        this.list = list;
    }

    @Override
    public String toString() {
        return "PageBean{" +
                "list=" + list +
                ", count=" + count +
                '}';
    }
}
